MSFlexGrid Control

The MSFlexGrid control displays and operates on tabular data. It allows complete flexibility to sort, merge, and format tables containing strings and pictures. When bound to a Data control, MsFlexGrid displays read-only data.

Syntax

MSFlexGrid

Remarks

You can put text, a picture, or both in any cell of a MSFlexGrid. The Row and Col properties specify the current cell in a MSFlexGrid. You can specify the current cell in code, or the user can change it at run time using the mouse or the arrow keys. The Text property references the contents of the current cell.

If a cell's text is too long to be displayed in the cell, and the WordWrap property is set to True, the text wraps to the next line within the same cell. To display the wrapped text, you may need to increase the cell's column width (ColWidth property) or row height (RowHeight property).

Use the Cols and Rows properties to determine the number of columns and rows in a MSFlexGrid control.

Distribution Note   Before you can use a MSFlexGrid control in your application, you must add the MSFlxGrd.ocx file to your project. To automatically include the file in your project, put it in the Autoload file. When distributing your application, you should install the MSFlxGrd.ocx file in the user's Microsoft Windows System directory. For more information about adding an ActiveX control to a project, see the Programmer's Guide.


AddItem Method (MSFlexGrid)

Adds a row to a MSFlexGrid control. Doesn't support named arguments.

Syntax

object.AddItem (item As String, index)

The AddItem method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
item	Required. A string expression displayed in the newly added row. To add multiple strings (for multiple columns in the row), use the tab character (vbTab) to separate each string.
Index	Optional. A Long representing the position within the control where the new row is placed. For the first row, index=0. If index is omitted, the new row becomes the last.


AddItem, RemoveItem Methods (MSFlexGrid) Example

This example uses the AddItem method to add 100 items to a MSFlexGrid. To try this example, paste the code into the Declarations section of a form with a MSFlexGrid control named MSFlexGrid1, and then press F5 and click the form.

Private Sub Form_Click ()

Dim Entry, i, Msg	' Declare variables.

Msg = _

"Choose OK to add 100 items to your MSFlexGrid."

MsgBox Msg	' Display message.

MSFlexGrid1.Cols = 2	' Two strings per row.

For i = 1 To 100	' Count from 1 to 100.

Entry = "Entry " & Chr(9) & I	' Create entry.

MSFlexGrid1.AddItem Entry	' Add entry.

Next i

Msg = "Choose OK to remove every other entry."

MsgBox Msg	' Display message.

For i = 1 To 50	' Determine how to

MSFlexGrid1.RemoveItem i	' remove every other

Next I	' item.

Msg = "Choose OK to clear all items."

MsgBox Msg	' Display message.

MSFlexGrid1.Clear	' Clear list box.

End Sub


AllowBigSelection Property

Returns or sets a value that determines whether clicking on a column or row header should cause the entire column or row to be selected.

Syntax

object.AllowBigSelection [= boolean ]

The AllowBigSelection property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	Determines whether an entire column or row is selected when the header is clicked. The property is True by default.
Remarks

For example, the following code allows an entire column or row to be selected when the user clicks on the header:

Sub Form1_Load ()

MSFlexGrid1.AllowBigSelection = True

End Sub


AllowUserResizing Property

Returns or sets a value that determines whether the user should be allowed to resize rows and columns in the MSFlexGrid control with the mouse.

Syntax

object.AllowUserResizing [= value ]

The AllowUserResizing property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	An integer or constant specifying whether a user can resize rows and columns, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexResizeNone	0	Default) None. The user can't resize with the mouse.
flexResizeColumns	1	Columns. The user can resize columns using the mouse.
flexResizeRows	2	Rows. The user can resize rows using the mouse.
flexResizeBoth	3	Both. The user can resize columns and rows using the mouse.
Remarks

To resize rows or columns, the mouse must be over the fixed area of the MSFlexGrid control, and close to a border between rows and columns. The mouse pointer will change into an appropriate sizing pointer and the user can drag the row or column to change the row height or column width. The following code allows this functionality:

Sub Form1_Load ()

MSFlexGrid1.AllowUserResizing = True

End Sub


BackColor, BackColorBkg, BackColorFixed, BackColorSel Properties

Returns or sets the background color of various elements of the MSFlexGrid.

Syntax

object.BackColor [=color ]

object.BackColorBkg [=color ]

object.BackColorFixed [=color ]

object.BackColorSel [=color ]

The BackColor, BackColorBkg, BackColorFixed, BackColorSel properties syntax have these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
color	A numeric expression that specifies the color.
Remarks

The picture below shows what part of the MSFlexGrid the properties refers to:

BackColor affects the color of all nonfixed cells. To set the background color of individual cells, use the CellBackColor property.


BackColor, BackColorBkg, BackColorFixed, BackColorSel Properties Example

This example uses the BackColorBkg, BackColorFixed, and BackColorSel properties in MSFlexGrid. It resets the colors of the controls background, selected background, and fixed-cell background randomly twice each second for MSFlexGrid control. To try this example, paste the code into the Declarations section of a form with a Timer control and an MSFlexGrid control with the names Timer1 and MSFlexGrid1, and then load the form.

Private Sub Form_Load ()

Timer1.Interval = 500

End Sub

Private Sub Timer1_Timer ()

MSFlexGrid1.BackColorBkg = QBColor(Rnd * 15)

MSFlexGrid1.BackColorFixed = QBColor(Rnd * 10)

MSFlexGrid1.BackColorSel = QBColor(Rnd * 10)

End Sub


CellAlignment Property

Returns or sets a value that determines the alignment of data in a cell or range of selected cells. Not available at design time.

Syntax

object.CellAlignment [= value ]

The CellAlignment property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	An integer or constant specifying how text should be aligned within cells, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexAlignLeftTop	0	Left Top
flexAlignLeftCenter	1	Left Center (default for strings)
flexAlignLeftBottom	2	Left Bottom
flexAlignCenterTop	3	Center Top
flexAlignCenterCenter	4	Center Center
flexAlignCenterBottom	5	Center Bottom
flexAlignRightTop	6	Right Top
flexAlignRightCenter	7	Right Center (default for numbers)
flexAlignRightBottom	8	Right Bottom
flexAlignGeneral	9	General: Left Center for strings, Right Center for numbers
Remarks

The following example sets the text alignment for each cell to Left Center using the constant setting.

Sub Form1_Load ()

MSFlexGrid1.CellAlignment = flexAlignLeftCenter

End Sub


CellBackColor, CellForeColor Properties

Returns or sets the background and foreground colors of individual cells or ranges of cells. Not available at design time.

Syntax

object.CellBackColor [= color ]

object.CellForeColor [= color ]

The CellBackColor and CellForeColor properties syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
color	Integer (enumerated). A numeric expression specifying the color for the current cell selection. Setting either of these properties to zero paints the cell using standard background and foreground colors.
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property.

Setting either of these properties to zero causes MSFlexGrid to paint the cell using the standard background and foreground colors. If you want to set either of these properties to black, set them to one instead of zero.

To set the colors of various MSFlexGrid elements, use the BackColorBkg, BackColorFixed, BackColorSel, ForeColorFixed, and ForeColorSel properties. To set all nonfixed cells to the same background color, use the BackColor property.


CellBackColor, CellForeColor Properties Example

This example uses the CellBackColor, and CellForeColor properties in MSFlexGrid. It resets the colors of the focused cell's background color and text color randomly twice each second for MSFlexGrid control. To try this example, paste the following code into the Declarations section of a form with a Timer control and an MSFlexGrid control with the names Timer1 and MSFlexGrid1, and then load the form.

Private Sub Form_Load ()

Timer1.Interval = 500

MSFlexGrid1.Text = "Focus Here"

End Sub

Private Sub Timer1_Timer ()

MSFlexGrid1.CellBackColor = QBColor(Rnd * 15)

MSFlexGrid1.CellForeColor = QBColor(Rnd * 10)

End Sub


CellFontBold Property

Returns or sets the bold style for the current cell text. Not available at design time.

Syntax

object.CellFontBold [= boolean ]

The CellFontBold property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	Determines whether the current cell text is bold. The property is False by default.
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property. The following code sets the text of the current cell to bold whenever the MSFlexGrid control is in focus:

Sub MSFlexGrid1_GotFocus()

MSFlexGrid1.CellFontBold = 1

End Sub


CellFontItalic Property

Returns or sets the italic style for the current cell text. Not available at design time.

Syntax

object.CellFontItalic [= boolean ]

The CellFontItalic property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	Determines whether the text style in the cell is italic. The property is False by default.
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property. The following code sets the text of the current cell to Italic whenever the MSFlexGrid control is in focus:

Sub MSFlexGrid1_GotFocus()

MSFlexGrid1.CellFontItalic = True

End Sub


CellFontName Property

Returns or sets the name of the font for the current cell text. Not available at design time.

Syntax

object.CellFontName [= name ]

The CellFontName property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
name	A string expression naming of one of the available font faces.
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property. The following code sets the text of the current cell to a specific font type whenever the MSFlexGrid control is in focus:

Sub MSFlexGrid1_GotFocus()

MSFlexGrid1.CellFontName = Screen.Fonts(3)

MSFlexGrid1.Text = Screen.Fonts(3)	' Displays font

' name.

End Sub


CellFontSize Property

Returns or sets the size, in points, for the current cell text. Not available at design time.

Syntax

object.CellFontSize [= value ]

The CellFontSize property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Single. A numeric expression specifying the size of the current cell text.
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property. The following code sets the text of the current cell to 12 points whenever the MSFlexGrid control is in focus:

Sub MSFlexGrid1_GotFocus()

MSFlexGrid1.CellFontSize = 12

End Sub


CellFontStrikeThrough Property

Returns or sets a value that determines if the FontStrikeThrough style is applied to the current cell text.

Syntax

object.CellFontStrikeThrough =[ boolean]

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
Boolean	A Boolean expression that specifies if the StrikeThrough style is applied to the cell text.
Settings

The settings for boolean are:

Setting	Description
True	The StrikeThrough style is applied to the cell.
False	(Default) The StrikeThrough style isn’t applied to the cell.
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property. The following code sets the text of the current cell to Strike-Through whenever the MSFlexGrid control is in focus:

Sub MSFlexGrid1_GotFocus

MSFlexGrid1.CellFontStrikeThrough = 1

End Sub


CellFontUnderline Property

Returns or sets a value that specifies if the underline style is applied to the current cell text.

Syntax

object.CellFontUnderline =[ boolean]

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies if the Underline style is applied to the cell text.
Settings

The settings for boolean are:

Setting	Description
True	The Underline style is applied to the cell.
False	(Default) The Underline style isn’t applied to the cell.
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property. The following code sets the text of the current cell to Underline whenever the MSFlexGrid control is in focus:

Sub MSFlexGrid1_GotFocus

MSFlexGrid1.CellFontUnderline = 1

End Sub


CellFontWidth Property

Returns or sets the width, in points, for the current cell text. Not available at design time.

Syntax

object.CellFontWidth [= value ]

The CellFontWidth property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Single. A numeric expression specifying the desired point width for the current cell's font.
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property. The following code sets the width of the text of the current cell when the MSFlexGrid control is in focus:

Sub MSFlexGrid1_GotFocus()

MSFlexGrid1.CellFontWidth = 5

End Sub


CellHeight, CellLeft, CellTop, CellWidth Properties (MSFlexGrid)

Returns the position and size of the current cell, in twips. Not available at design time.

Syntax

object.CellHeight

object.CellLeft

object.CellTop

object.CellWidth

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

These properties are useful if you want to emulate in-cell editing. By trapping the MSFlexGrid control's KeyPress event, you can place a text box or some other control over the current cell and let the user edit its contents.

The return values are always in twips, regardless of the form's ScaleMode setting.


CellPicture Property

Returns or sets an image to be displayed in the current cell or in a range of cells. Not available at design time.

Syntax

object.CellPicture [= picture ]

The CellPicture property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
picture	Bitmap, icon, or metafile graphic. Can also be assigned to another control's Picture property.
Remarks

You can set this property at run time using the LoadPicture function on a bitmap, icon, or metafile, or by assigning to it another control's Picture property.

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property.

Each cell may contain text and a picture. The relative position of the text and picture is determined by the CellAlignment and CellPictureAlignment properties.


CellPicture Property Example

This example loads icons from the Visual Basic icon library into two cells in an MSFlexGrid control. You can use any two icons. Paste the code into the Declarations section of a form that has the MSFlexGrid control. Press F5 to run the program, and then click the form.

Private Sub Form_Click ()

' Load the icons.

MSFlexGrid1.Row = 1

MSFlexGrid1.Col = 1

Set MSFlexGrid1.CellPicture = _

LoadPicture("Icons\Computer\Trash02a.ico")

MSFlexGrid1.Row = 1

MSFlexGrid1.Col = 2

Set MSFlexGrid1.CellPicture = _

LoadPicture("Icons\Computer\Trash02b.ico")

End Sub


CellPictureAlignment Property

Returns or sets the alignment of pictures in a cell or range of selected cells. Not available at design time.

Syntax

object.CellPictureAlignment [= value ]

The CellPictureAlignment property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	An integer or constant specifying how pictures should be aligned within cells, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexAlignLeftTop	0	Left Top
flexAlignLeftCenter	1	Left Center
flexAlignLeftBottom	2	Left Bottom
flexAlignCenterTop	3	Center Top
flexAlignCenterCenter	4	Center Center
flexAlignCenterBottom	5	Center Bottom
flexAlignRightTop	6	Right Top
flexAlignRightCenter	7	Right Center
flexAlignRightBottom	8	Right Bottom
Remarks

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property.

The following code sets the picture alignment of the current cell to Right Center using the constant value.

Sub Form1_Load

MSFlexGrid1.CellPictureAlignment = _

flexAlignRightCenter

End Sub


CellTextStyle Property

Returns or sets the three-dimensional style for text on a specific cell or range of cells. Not available at design time.

Syntax

object.CellTextStyle [= value ]

The CellTextStyle property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	An integer or constant specifying one of the constants of the CellTextStyle property, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexTextFlat	0	Flat (normal text)
flexTextRaised	1	Raised
flexTextInset	2	Inset
flexTextRaisedLight	3	Raised Light
flexTextInsetLight	4	Inset Light
Remarks

Settings 1 and 2 work best for large and bold fonts. Settings 3 and 4 work best for small regular fonts. The cell's appearance is also affected by the backcolor settings; some backcolor settings do not show the raised or inset feature.

Changing this property affects the current cell or the current selection, depending on the setting of the FillStyle property.

The following code sets the text style of the current cell or current selection to Inset using the constant value.

Sub MSFlexGrid1_GotFocus

MSFlexGrid1.CellTextStyle = flexTextInset

End Sub


Clear Method (MSFlexGrid)

Clears the contents of the MSFlexGrid. This includes all text, pictures, and cell formatting. The Clear method does not affect the number of rows and columns on the MSFlexGrid.

Syntax

object.Clear

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

To remove cells instead of just clearing them, use the RemoveItem method on each row to be removed.


Clear Method (MSFlexGrid) Example

This example puts "Flex" into the current cell whenever the user clicks on a cell. Whenever the user double-clicks, it clears the MSFlexGrid control. To run the program click F5.

Private Sub Form1_Load ()

MSFlexGrid1.Rows = 8

MSFlexGrid1.Cols = 5

End Sub

Private Sub MSFlexGrid1_Click ()

' Put text in current cell.

MSFlexGrid1.Text = "Flex"

End Sub

Private Sub MSFlexGrid1.DblClick ()

MSFlexGrid1.Clear

End Sub


Clip Property (MSFlexGrid)

Returns or sets the contents of the cells in MSFlexGrid control's selected region. Not available at design time.

Syntax

object.Clip [= string ]

The Clip property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
string	A string expression with the contents of the selected area.
Remarks

The string may hold the contents of multiple rows and columns. In string, a tab character, Chr (9), or the constant vbTab indicates a new cell in a row, and a carriage return, Chr (13) or vbCR indicates the beginning of a new row. Use the Chr function or the vb constants to embed these characters in strings.

When placing data into a MSFlexGrid control, only the selected cells are affected. If there are more cells in the selected region than are described in string, the remaining cells are left alone. If there are more cells described in string than in the selected region, the unused portion of string is ignored.


Clip Property (MSFlexGrid) Example

This example puts "James," "Nancy," and "Lisa" into the selected cells whenever the user selects a group of cells. Whenever the user double-clicks, it clears the MSFlexGrid control. To run the program click F5.

Private Sub Form1_Load ()

MSFlexGrid1.Rows = 8

MSFlexGrid1.Cols = 5

End Sub

Private Sub MSFlexGrid1_MouseUp (Button As Integer, _

Shift as Integer, X As Single, Y As Single)

Dim myStr As String

myStr = "James" + Chr(9) + "Nancy" + Chr(9) + "Lisa"

MSFlexGrid1.Clip = myStr

End Sub


Col, Row Properties (MSFlexGrid)

Returns or sets the coordinates of the active cell in a MSFlexGrid. Not available at design time.

Syntax

object.Col [= number ]

object.Row [= number ]

The Col, Row syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Long. A numeric expression specifying the position of the active cell.
Remarks

Use these properties to specify a cell in a MSFlexGrid or to find out which row or column contains the current cell. Columns and rows are numbered from zero, beginning at the top for rows and at the left for columns.

Setting these properties automatically resets RowSel and ColSel, so the selection becomes the current cell. Therefore, to specify a block selection, you must set Row and Col first, then set RowSel and ColSel.

The value of the current cell, defined by the Col and Row settings, is the text contained in that cell. To modify a cell's value without changing the selected Row and Col properties, use the TextMatrix property.


Col, Row, Text Properties (MSFlexGrid) Example

This example puts "Here" into the current cell and then changes the active cell to the third cell in the third row and puts "There" into that cell. To run the program click F5, then click the grid.

Private Sub Form1_Load ()

MSFlexGrid1.Rows = 8

MSFlexGrid1.Cols = 5

End Sub

Private Sub MSFlexGrid1_Click ()

' Put text in current cell.

MSFlexGrid1.Text = "Here"

 	'	Put text in third row, third column.

MSFlexGrid1.Col = 2

MSFlexGrid1.Row = 2

MSFlexGrid1.Text = "There"

End Sub


ColAlignment Property (MSFlexGrid)

Returns or sets the alignment of data in a column. Not available at design time (except indirectly through the FormatString property).

Syntax

object.ColAlignment( number ) [= value ]

The ColAlignment property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Long. The number of the column in the MSFlexGrid control, or -1 to set all columns at once.
value	Integer or constant specifying the alignment of data in a column, as described in Settings.
Remarks

The settings for value are:

Constant	Value	Description
flexAlignLeft	0	Left Align
flexAlignRight	1	Right Align
flexAlignCenter	2	Center Data
Remarks

Any column can have an alignment that is different from other columns. This property affects all cells in the specified column, including those in fixed rows.

To set individual cell alignments, use the CellAlignment property. To set column alignments at design time, use the FormatString property.

The following code sets the column alignment of the third column to Right Align using the constant value.

Sub Form1_Load ()

MSFlexGrid1.ColAlignment(3) = flexAlignRight

End Sub


ColData, RowData Properties

Returns or sets an arbitrary long value associated with each row and column. Not available at design time.

Syntax

object.ColData( number ) [= value ]

object.RowData( number ) [= value ]

The ColData, RowData syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Long. The number of the column or row in the MSFlexGrid control where to save or retrieve the data.
value	Long. A numeric expression specifying the contents of the ColData or RowData arrays.
Remarks

Use the RowData and ColData properties to associate a specific number with each row or column on a MSFlexGrid control. You can then use these numbers in code to identify the items.

For example, you can add rows containing totals to a MSFlexGrid and identify those rows by setting their RowData property to a nonzero value. To update the totals later, you can delete the old totals by scanning the RowData array and removing the appropriate rows.

Another typical use of the RowData property is to keep an index into an array of data structures associated with the items described on each row.


ColIsVisible Property

Returns a Boolean value that indicates whether a specified column is currently visible.

Syntax

object.ColIsVisible( index )

The ColIsVisible property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
index	Long. The number of the column. The value must be in the range of 0 to Cols property –1.
Return Values

The return values for the ColIsVisible property are:

Setting	Description
True	The specified column is currently visible.
False	The specified column is not currently visible.


ColPosition, RowPosition Properties

Sets the position of a MSFlexGrid row or column, allowing you to move rows and columns to specific positions.

Syntax

object.ColPosition( number ) [= value ]

object.RowPosition( number ) [= value ]

The ColPosition, RowPosition properties syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Long. The number of the column or row to be moved.
value	Integer. A numeric expression specifying the new position of the column or row.
Remarks

The index and setting must correspond to valid row or column numbers (in the range 0 to Rows –1 or Cols –1) or an error will be generated.

For example, the following code moves a column to first position when the user clicks on it:

Sub MSFlexGrid1_Click ()

MSFlexGrid1.ColPosition(MSFlexGrid1.MouseCol) = 0

End Sub

When a row or column is moved with these properties, all formatting information moves with it, including width, height, alignment, colors, fonts, and so on. To move text only, use the Clip property instead.


Cols, Rows Properties (MSFlexGrid)

Returns or sets the total number of columns or rows in a MSFlexGrid.

Syntax

object.Cols [= value ]

object.Rows [= value ]

The Cols, Rows syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Long. A numeric expression specifying the number of columns or rows.
Remarks

You can use these properties to expand and shrink MSFlexGrid dynamically at run time.

The minimum number of rows and columns is 0. The maximum number is limited by the memory available on your computer.

The value of Cols must be at least one greater than the value of FixedCols, unless they are both set to zero. The value of Rows must be at least one greater than the value of FixedRows, unless they are both set to zero.


Cols, Rows Properties (MSFlexGrid) Example

This example puts "Here" into the current cell and then changes the active cell to the third cell in the third row and puts "There" into that cell. To run the program click F5, then click the grid.

Private Sub Form_Load ()

MSFlexGrid1.Rows = 8

MSFlexGrid1.Cols = 5

End Sub

Private Sub MsFlexGrid1_Click ()

' Put text in current cell.

MSFlexGrid1.Text = "Here"

 	' Put text in third row, third column.

MSFlexGrid1.Col = 2

MSFlexGrid1.Row = 2

MSFlexGrid1.Text = "There"

End Sub


ColSel, RowSel Properties

Returns or sets the starting or ending row or column for a range of cells. Not available at design time.

Syntax

object.ColSel [= value ]

object.RowSel [= value ]

The ColSel, RowSel properties syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Long. A numeric expression specifying the starting or ending row or column for a range of cells.
Remarks

You can use these properties to select a specific region of MSFlexGrid from code, or to read into code the dimensions of an area that the user selects.

The MSFlexGrid cursor is the cell at Row, Col. The MSFlexGrid selection is the region between rows Row and RowSel and columns Col and ColSel. Note that RowSel may be above or below Row, and ColSel may be to the left or to the right of Col.

Whenever you set the Row and Col properties, RowSel and ColSel are automatically reset so the cursor becomes the current selection. If you want to select a block of cells from code, you must set the Row and Col properties first, then set RowSel and ColSel.

The following code writes in the current value of the ColSel property into the first cell of MSFlexGrid1. This value changes as the user clicks on various selections of cell groups.

Private Sub MSFlexGrid1_MouseUp _

(Button As Integer, Shift As Integer, x As Single, _

y As Single)

MSFlexGrid1.Text = MSFlexGrid1.ColSel

End Sub


ColPos Property

Returns the distance in twips between the upper-left corner of the control and the upper-left corner of a specified column.

Syntax

object.ColPos( index )

The ColPos property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
index	Long. The number of the column. The value must be in the range of 0 to Cols property –1.


ColWidth Property (MSFlexGrid)

Returns or sets the width of the specified column in twips. Not available at design time.

Syntax

object.ColWidth( number ) [= value ]

The ColWidth property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Long. The number of the column in the MSFlexGrid control, or  –1 to set all columns at once.
value	A numeric expression specifying the width of the specified column in twips.
Remarks

You can use this property to set the width of any column at run time. For instructions on setting column widths at design time, see the FormatString property.

You can set ColWidth to zero to create invisible columns, or to –1 to reset the column width to its default value, which depends on the size of the current font.

The following code writes in the current value of the current size of the first column. This can be more apparent by setting the AllowUserResizing property to True, so that the value changes as the user resizes Column 1.

Sub Form1_Load()

MSFlexGrid1.AllowUserResizing = True

End Sub

Sub MSFlexGrid1_MouseUp (Button As Integer, Shift As _

Integer, X As Single, Y As Single)

MSFlexGrid1.Text = MSFlexGrid1.ColWidth(0)

End Sub


Compare Event

Occurs when the Sort property for the MSFlexGrid control is set to Custom Sort (9) so the user can customize the sort process.

Syntax

Private Sub object_Compare(row1 As Integer, row2 As Integer, cmp As Integer)

The Compare event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row1	A Long representing the first row in a pair of rows being compared.
row2	A Long representing the second row in a pair of rows being compared.
cmp	Integer that represents the sort order of each pair, as described in Settings.
Settings

The event handler must compare rows row1 and row2 and set cmp to:

Setting	Description
–1	If row1 should appear before row2.
0	If both rows are equal or either row can appear before the other.
1	If row1 should appear after row2.
Remarks

When the Sort property is set to 9 (Custom Sort), the Compare event is triggered once for each pair of rows in the control that you want to compare. Because the Compare event uses row numbers instead of text values, you can use it to compare any property value for that row, including RowData. Custom sorts are always much slower that the built-in sorts. However, you can sort a row by any column or using any other cell property.


EnterCell Event

Occurs when the currently active cell changes to a different cell.

Syntax

Private Sub object_EnterCell ()

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

Dragging the mouse over a cell does not trigger the EnterCell event. Clicking the mouse on a fixed row will trigger this event on the first nonfixed column in that row.


FillStyle Property (MSFlexGrid)

Returns or sets a value that determines whether setting the Text property or one of the cell formatting properties of a MSFlexGrid applies the change to all selected cells.

Syntax

object.FillStyle[ = value ]

The FillStyle property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer or constant that specifies the fill style, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexFillSingle	0	Single (default). Changing Text or any of the cell properties only affects the active cell.
flexFillRepeat	1	Repeat. Changing the Text or any of the cell properties affects all selected cells.
Remarks

The following code allows you to format individual cells differently.

Sub Form1_Load ()

MSFlexGrid1.FillStyle = 0

End Sub

FillStyle must be set to 1(Repeat) whenever you want a cell change to apply to all cells.


FixedCols, FixedRows Properties (MSFlexGrid)

Returns or sets the total number of fixed columns or fixed rows for a MSFlexGrid control. By default, MSFlexGrid has one fixed column and one fixed row.

Syntax

object.FixedCols [= value ]

object.FixedRows [= value ]

The FixedCols, FixedRows properties syntax have these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Long. A numeric expression specifying total number of fixed columns or fixed rows.
Remarks

Fixed columns and rows do not move when the other columns or rows in MSFlexGrid are scrolled. You can have zero or more fixed columns and zero or more fixed rows. You can select the colors, font, grid and text style use for the fixed columns and rows.

Selecting a fixed row or column at run time selects all cells in that row or column unless the SelectionMode property has a nonzero value.

If the value of the AllowUserResizing property is nonzero, having fixed rows or columns in your MsFlexGrid control allows you to resize them at run time using the mouse.

Fixed columns and rows are typically used in spreadsheet applications to display row numbers and column names or letters.

For example, the following code sets the first row to be fixed, and the first and second columns to be fixed:

Sub Form1_Load ()

MSFlexGrid1.FixedCols = 2

MSFlexGrid1.FixedRows = 1

End Sub


FocusRect Property

Returns or sets a value that determines whether the MSFlexGrid control should draw a focus rectangle around the current cell.

Syntax

object.FocusRect [= value ]

The FocusRect property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer or constant that specifies the focus rectangle style, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexFocusNone	0	None. No focus rectangle around current cell.
flexFocusLight	1	Light (default). Light focus rectangle around current cell.
flexFocusHeavy	2	Heavy. Heavy focus rectangle around current cell.
Remarks

If a focus rectangle is drawn, then the current cell is painted in the background color, as in most spreadsheets and grids. Otherwise, the current cell is painted in the selection color, so you can see which cell is selected even without the focus rectangle.

For example, the following code sets the focus rectangle for the active cell to a Light Rectangle, using the constant value.

Sub Form1_Load ()

MSFlexGrid1.FocusRect = flexFocusLight

End Sub


FontWidth Property

Returns or sets the width, in points, of the font to be used for text displayed in a MSFlexGrid control.

Syntax

object.FontWidth [= value ]

The FontWidth property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Single. A numeric expression specifying the desired point width for the current font.
Remarks

The font width is normally chosen by Windows to match the selected font height and provide a standard aspect ratio. MSFlexGrid allows you to specify fonts that are narrower or wider than the default so you can display more information in a cell or highlight certain cells.

When you specify a font width, Windows will try to select or generate a font to match your request. For best results, use TrueType fonts, which are more flexible. The Courier New font, for instance, looks very good when you make it a little narrower than its default.

To restore the default font width, set this property to zero.

To set the font of individual cells or cell ranges, use the CellFontBold, CellFontItalic, CellFontName, CellFontSize, and CellFontWidth properties.


ForeColor, ForeColorFixed, ForeColorSel Properties

Returns or sets the color used to draw text on each part of the MSFlexGrid control.

Syntax

object.ForeColor [= color ]

object.ForeColorFixed [= color ]

object.ForeColorSel [= color ]

The ForeColor, ForeColorFixed, ForeColorSel properties syntax have these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
color	A value or constant that determines the color used to paint text in the scrollable or fixed areas of MSFlexGrid.
Remarks

The picture below shows what part of MSFlexGrid the properties refer to:

Use the ForeColor property to set the text color of all nonfixed cells. To set the text color of individual cells, use the CellForeColor property.


ForeColor, ForeColorFixed, ForeColorSel Properties Example

This example sets the ForeColorFixed and the ForeColorSel Properties of MSFlexGrid to random colors every second:

Private Sub Form_Load ()

Timer1.Interval = 500

MSFlexGrid1.FillStyle = 2

MSFlexGrid1.Text = "Color Me"

MSFlexGrid1.FixedCols = 1

MSFlexGrid1.FixedRows = 1

End Sub

Private Sub Timer1_Timer ()

MSFlexGrid1.ForeColorFixed = QBColor(Rnd * 15)

MSFlexGrid1.ForeColorSel = QBColor(Rnd * 10)

End Sub


FormatString Property

Sets a format string that sets up a MSFlexGrid control's column widths, alignments, and fixed row and column text.

Syntax

object.FormatString[= string ]

The FormatString property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
string	A string expression for formatting text in rows and columns, as described in Remarks.
Remarks

MSFlexGrid parses the FormatString at design time and interprets it to get the following information: number of rows and columns, text for row and column headings, column width, and column alignment.

The FormatString property is made up of segments separated by pipe characters ( | ). The text between pipes defines a column, and it may contain the special alignment characters <, ^, or >, to align the entire column to the left, center, or right. The text is assigned to row zero, and its width defines the width of each column.

The FormatString may also contain a semi-colon (";"), which causes the remainder of the string to be interpreted as row heading and width information. The text is assigned to column zero, and the longest string defines the width of column zero.

MSFlexGrid will create additional rows and columns to accommodate all fields defined by the FormatString, but it will not delete rows or columns if only a few fields are specified. If you want, you can do this by setting the Rows and Cols properties.


FormatString Property Example

The examples below illustrate how the FormatString property works.

' Set column headers.

s$ = "<Region  |<Product   |<Employee   |>Sales    "

MSFlexGrid1.FormatString = s$

' Set row headers (note semicolon at start)

s$ = ";Name|Address|Telephone|Social Security#"

MSFlexGrid1.FormatString = s$

' Set column and row headers.

s$ = "|Name|Address|Telephone|Social Security#"

s$ = s$ + ";|Robert|Jimmy|Bonzo|John Paul"

MSFlexGrid.FormatString = s$


GridColor, GridColorFixed Properties

Returns or sets the color used to draw the lines between the MSFlexGrid control's cells.

Syntax

object.GridColor [= color ]

object.GridColorFixed [= color ]

The GridColor, GridColorFixed syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
color	A value or constant that determines the color used to paint the gridlines in the scrollable or fixed areas of MSFlexGrid.
Remarks

The GridColor property is used only when the GridLines property is set to 1 (Lines), and GridColorFixed is used only when GridLinesFixed is set to 1 (Lines.) Raised and inset grid lines are always drawn in black and white.


GridLines, GridLinesFixed Properties (MSFlexGrid)

Returns or sets a value that determines what type of lines should be drawn between cells.

Syntax

object.GridLines [= value ]

object.GridLinesFixed [= value ]

The GridLines, GridLinesFixed properties syntax have these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	An integer or constant specifying the type of lines drawn, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexGridNone	0	No Lines. No lines in-between cells.
flexGridFlat	1	Lines(default for GridLines). Sets line style between cells to normal lines.
flexGridInset	2	Inset Lines (default for GridLinesFixed). Sets line style between cells to inset lines.
flexGridRaised	3	Raised Lines. Sets line style between cells to raised lines.
Remarks

When the GridLines property is set to 1 (Lines), the color of the lines is determined by the GridColor property. Raised and inset grid lines are always drawn in black and white.


HighLight Property (MSFlexGrid)

Returns or sets a value that determines whether selected cells appear highlighted.

Syntax

object.HighLight [= value ]

The HighLight property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer or constant specifying when MSFlexGrid should highlight selected cells, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexHighlightNever	0	Never highlight selected cells.
flexHighlightAlways	1	Always highlight selected cells.
flexHighlightWithFocus	2	Highlight selected cells when control has focus.
Remarks

When this property is set to zero and the user selects a range of cells, there is no visual cue that shows which cells are currently selected. When the property is set to 2 (With Focus), the highlight appears only when the control has focus.


LeaveCell Event

Occurs immediately before the currently active cell changes to a different cell.

Syntax

Private Sub object_LeaveCell ()

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

This event is useful for validating a cell's contents. The LeaveCell event is not triggered when the focus moves to a different control.


LeftCol Property (MSFlexGrid)

Returns or sets the left-most visible column (other than a fixed column) in the MSFlexGrid control. Not available at design time.

Syntax

object.LeftCol [= value ]

The LeftCol property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer. A numeric expression specifying the left-most column.
Remarks

You can use this property in code to scroll MSFlexGrid programmatically. Use the TopRow property to determine the topmost visible row in the MSFlexGrid.


MergeCells Property

Returns or sets a value that determines whether cells with the same contents should be grouped in a single cell spanning multiple rows or columns.

Syntax

object.MergeCells [= value ]

The MergeCells property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer or constant specifying the grouping of cells, as specified in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexMergeNever	0	(Default) Never group cells with the same contents.
flexMergeFree	1	Free
flexMergeRestrictRows	2	Restrict Rows
flexMergeRestrictColumns	3	Restrict Columns
flexMergeRestrictBoth	4	Restrict Both
Remarks

This ability to merge cells allows you to present data in a clear, appealing way. Cell merging is can be used in concert with MSFlexGrid control's sorting and column ordering capabilities.

To use MSFlexGrid control's cell merging capabilities, you must do two things:

1.	Set MergeCells to a value other than zero. (The difference between the settings is explained below.)

2.	Set the MergeRow() and MergeCol() array properties to True for the rows and columns you wish to merge.

MSFlexGrid will merge cells with the same contents, and will update the merging automatically whenever you change the contents of any cells.

With Free merging, cells with the same contents are always merged. With Restricted merging, only adjacent cells with the same content — to the left or to the top — are merged.

Note   When MergeCells is set to a value other than 0 (Never), selection highlighting is automatically turned off. This is done mainly to speed up repainting, but also because selection of ranges containing merged cells may lead to unexpected results.


MergeCells Property Example

The examples below show the same MSFlexGrid with each different setting for the MergeCells property.

No Merging MergeCells = 0 MergeRow(0) = True MergeRow(1) = True MergeRow(2) = True MergeRow(3) = False This is the regular view.
Free Merging MergeCells = 1 MergeRow(0) = True MergeRow(1) = True MergeRow(2) = True MergeRow(3) = False Notice how the third employee cell (Donna) merges across products to its left and across sales to its right.
Restricted Merging MergeCells = 2 MergeRow(0) = True MergeRow(1) = True MergeRow(2) = True MergeRow(3) = False Notice how the third employee cell (Donna) no longer merges across sales.


MergeCol, MergeRow Properties

Returns or sets a value that determines which rows and columns should have their contents merged when the MergeCells property is set to a value other than 0 (Never).

Syntax

object.MergeCol( number ) [= boolean ]

object.MergeRow( number ) [= boolean ]

The MergeCol, MergeRows properties syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Long. The number of the column or row in the MSFlexGrid control.
boolean	These properties are set to False by default.
Remarks

If the MergeCells property is set to a nonzero value, adjacent cells with identical values are merged if they are in a row with the MergeRow property set to True or in a column with the MergeCol property set to True.

For details on how MSFlexGrid control's merging technology works, see the MergeCells property.


MouseCol, MouseRow Properties

Returns the current mouse position, in row and column coordinates.

Syntax

object.MouseCol

object.MouseRow

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

You can use these properties in code to determine where the mouse is and act accordingly. These properties are especially useful to display context-sensitive help on the contents of individual cells or to test whether the user has clicked on a fixed row or column.


Picture Property (MSFlexGrid)

Returns a picture of the MSFlexGrid control, suitable for printing, saving to disk, copying to the clipboard, or assigning to a different control.

Syntax

object.Picture

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

The Picture property creates a bitmap showing the MSFlexGrid control. The bitmap created looks exactly like the one on the screen, except it is extended to the right and to the bottom to accommodate all rows and columns. This means that if you have an MSFlexGrid control with 1000 rows, the bitmap will normally include all of them, and the picture will be huge.

If you want to create a picture of a part of the MSFlexGrid control, write a routine to hide all the elements you don't want to show, get the picture, and then restore the control.

If the MSFlexGrid is very large, the bitmap created will also be large. To reduce the size of the bitmap and increase speed, you may consider setting the PictureType property to 1 (Monochrome bitmap). The picture will not look as nice, but it will be much smaller in memory. The code in the example shows how you can trap out-of-memory errors and automatically switch to monochrome mode by using the PictureType property.

The following example shows how to set the MSFlexGrid control's Picture property to a PictureBox control:

Private Sub Form_Click ()

Set Picture1.Picture = MSFlexGrid1.Picture

End Sub


ColData, RowData, Picture Properties Example

The code below shows how to create a MSFlexGrid picture that includes only the current selection.

Sub CopySelectedPictureToClipboard (myFlex As _

MSFlexGrid)

Dim i As Integer, tr As Long, lc As Long, _

hl As Integer

' Get ready to operate.

MyFlex.Redraw = False	' To eliminate flicker.

hl = MyFlex.HighLight	' Save current settings.

tr = MyFlex.TopRow

lc = MyFlex.LeftCol

MyFlex.HighLight = 0	' No highlight on picture.

' Hide nonselected rows and columns.

' (Save original sizes in RowData/ColData

' properties.)

For i = MyFlex.FixedRows To MyFlex.Rows - 1

If i < MyFlex.Row Or i > MyFlex.RowSel Then

MyFlex.RowData(i) = MyFlex.RowHeight(i)

MyFlex.RowHeight(i) = 0

End If

Next

For i = MyFlex.FixedCols To MyFlex.Cols - 1

If i < MyFlex.Col Or i > MyFlex.ColSel Then

MyFlex.ColData(i) = MyFlex.ColWidth(i)

MyFlex.ColWidth(i) = 0

End If

Next

' Scroll to top left corner.

MyFlex.TopRow = MyFlex.FixedRows

MyFlex.LeftCol = MyFlex.FixedCols

' Copy picture.

clipboard.Clear

On Error Resume Next

MyFlex.PictureType = 0 ' Color.

clipboard.SetData MyFlex.Picture

If Error <> 0 Then

MyFlex.PictureType = 1 ' Monochrome.

clipboard.SetData MyFlex.Picture

Endif

' Restore control.

For i = MyFlex.FixedRows To MyFlex.Rows - 1

If i < MyFlex.Row Or i > MyFlex.RowSel Then

MyFlex.RowHeight(i) = MyFlex.RowData(i)

End If

Next

For i = MyFlex.FixedCols To MyFlex.Cols - 1

If i < MyFlex.Col Or i > MyFlex.ColSel Then

MyFlex.ColWidth(i) = MyFlex.ColData(i)

End If

Next

MyFlex.TopRow = tr

MyFlex.LeftCol = lc

MyFlex.HighLight = hl

MyFlex.Redraw = True

End Sub


PictureType Property

Returns or sets the type of picture that should be generated by the Picture property.

Syntax

object.PictureType [= type ]

The PictureType property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer or constant specifying the type of picture that should be generated, as described in Settings.
Settings

Settings for type are:

Constant	Value	Description
flexPictureColor	0	Display compatible bitmap.
flexPictureMonochrome	1	Monochrome bitmap.
Remarks

Set this property to 0 (Display compatible) to obtain a high-quality image. Set it to 1 (Monochrome bitmap) to obtain a lower-quality image that consumes less memory.


Redraw Property

Returns or sets a value that determines whether the MSFlexGrid control should or not be automatically redrawn after each change.

Syntax

object.Redraw [= boolean ]

The Redraw property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	The property is True by default.
Remarks

You can use this property in code to reduce flicker while making extensive updates to the contents of the MSFlexGrid control.

For example, the code below turns repainting off, makes several changes to the contents of MSFlexGrid, and then turns repainting back on to show the results:

Dim i As Integer

' Freeze MSFlexGrid to avoid flicker.

MSFlexGrid.Redraw = False

' Update MSFlexGrid contents.

For i = MSFlexGrid1.FixedRows To MSFlexGrid1.Rows - 1

MSFlexGrid1.TextMatrix(i, 1) = GetName(i, 1)

MSFlexGrid1.TextMatrix(i, 2) = GetName(i, 2)

Next

' Show results.

MSFlexGrid1.Redraw = True


RemoveItem Method (MSFlexGrid)

Removes a row from a MSFlexGrid control at run time. Doesn't support named arguments.

Syntax

object.RemoveItem index

The RemoveItem method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
index	Integer representing the row to remove.
Remarks

To remove the first row, use index = 0.

The RemoveItem method deletes the entire row specified. To clear data without removing the rows themselves, use the Clear method.


RowColChange Event (MSFlexGrid)

Occurs when the currently active cell changes to a different cell.

Syntax

Private Sub object_RowColChange ()

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

The order of events triggered when the active cell changes is: LeaveCell, EnterCell, RowColChange.

The RowColChange event occurs when a user clicks a new cell, but not while a user drags the selection across the MSFlexGrid control.


RowHeight Property (MSFlexGrid)

Returns or sets the height of the specified row, in twips. Not available at design time.

Syntax

object.RowHeight( number )[= value ]

The RowHeight property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Integer. The number of the row in the MSFlexGrid control, or -1 to set all rows at once.
value	Single. A numeric expression specifying the height of the row in twips.
Remarks

You can set RowHeight to zero to create invisible rows, or to –1 to reset the row height to its default value, which depends on the size of the current font.

RowHeight is independent of the form's scale mode.


RowHeightMin Property

Returns or sets the minimum row height for the entire control, in twips.

Syntax

object.RowHeightMin [= value ]

The RowHeightMin property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Single. A numeric expression specifying the minimum row height for MSFlexGrid.
Remarks

Use this property if you wish to use small fonts but want the rows to be tall. Setting this property is sometimes easier than setting individual row heights with the RowHeight property.

RowHeight is independent of the form's scale mode.


RowIsVisible Property

Returns a Boolean value that indicates whether a specified row is currently visible.

Syntax

object.RowIsVisible( index )

The RowIsVisible property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
index	Long. The number of the column. The value must be in the range of 0 to Cols property –1.
Return Values

The return values for the RowIsVisible property are:

Setting	Description
True	The specified row is currently visible.
False	The specified row is not currently visible.


RowPos Property

Returns the distance in twips between the upper-left corner of the control and the upper-left corner of a specified row.

Syntax

object.RowPos ( index )

The RowPos property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
index	Long. The number of the column. The value must be in the range of 0 to Cols property –1.


SelectionMode Property

Returns or sets a value that determines whether a MSFlexGrid should allow regular cell selection, selection by rows, or selection by columns.

Syntax

object.SelectionMode [= number ]

The SelectionMode property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Integer or constant specifying the selection mode, as described in Settings.
Settings

The settings for number are:

Constant	Value	Description
flexSelectionFree	0	Free. Allows selections to be made normally, spreadsheet-style.
flexSelectionByRow	1	By Row. Forces selections to span entire rows, as in a multi-column list-box or record-based display.
flexSelectionByColumn	2	By Column. Forces selections to span entire columns, as if selecting ranges for a chart or fields for sorting.


Scroll Event (MSFlexGrid)

Occurs when the MSFlexGrid scrolls its contents, either through the scroll bars, keyboard, or code changing the TopRow or LeftCol properties.

Syntax

Private Sub object_Scroll ()

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

If the ScrollTrack property is set to True, the scroll event is triggered while the user is dragging/scrolling the mouse; otherwise, it is not triggered until the drag is complete.


ScrollBars Property (MSFlexGrid)

Returns or sets a value that determines whether a MSFlexGrid has horizontal and/or vertical scroll bars.

Syntax

object.ScrollBars [= value ]

The ScrollBars property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer or constant specifying the type of scrollbars, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexScrollNone	0	None
flexScrollHorizontal	1	Horizontal
flexScrollVertical	2	Vertical
flexScrollBoth	3	Both
Remarks

Scroll bars appear on a MSFlexGrid only if its contents extend beyond the MSFlexGrid control's borders. For example, a vertical scroll bar appears when MSFlexGrid can't display all of its rows. If ScrollBars is set to False, MSFlexGrid will not have scroll bars, regardless of its contents.

Note that if MSFlexGrid has no scroll bars in either direction, it will not allow any scrolling in that direction, even if the user uses the keyboard to select a cell that is off the visible area of the control.


ScrollTrack Property

Returns or sets a value that determines whether MSFlexGrid should scroll its contents while the user moves the scroll box along the scroll bars.

Syntax

object.ScrollTrack [= boolean ]

The ScrollTrack property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	This property is False by default.
Remarks

This property should normally be set to False to avoid excessive scrolling and flickering. Set it to True only if you want to emulate other controls that have this behavior, or when you want to view rows and columns as they are being scrolled.


SelChange Event (MSFlexGrid)

Occurs when the selected range changes to a different cell or range of cells.

Syntax

Private Sub object_SelChange ()

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

The SelChange event occurs whenever the user clicks a cell other than the selected cell and as a user drags to select a new range of cells. A user can also select a range of cells by pressing the SHIFT key and using the arrow keys.

This event can be triggered in code by changing the selected region using the Row, Col, RowSel, or ColSel properties. The RowColChange event also occurs when a user clicks a new cell but does not occur while a user drags the selection across MSFlexGrid.


Sort Property (MSFlexGrid)

Sets a value that sorts selected rows according to selected criteria. Not available at design time.

Syntax

object.Sort [=value]

The Sort property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer or constant specifying the type of sorting, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexSortNone	0	None
flexSortGenericAscending	1	Generic Ascending. Guesses whether text is string or number
flexSortGenericDescending	2	Generic Descending
flexSortNumericAscending	3	Numeric Ascending. Converts strings to numbers
flexSortNumericDescending	4	Numeric Descending
flexSortStringNoCaseAsending	5	String Ascending. Case-insensitive
flexSortNoCaseDescending	6	String Descending. Case-insensitive
flexSortStringAscending	7	String Ascending. Case-sensitive
flexSortStringDescending	8	String Descending. Case-sensitive
	9	Custom. Uses Compare event to compare rows
Remarks

The Sort property always sorts entire rows. The range to be sorted is specified by setting the Row and RowSel properties. If Row and RowSel are the same, MSFlexGrid assumes that you want to sort all nonfixed rows.

The keys used for sorting are determined by the Col and ColSel properties, always from the left to the right. For example, if Col = 3 and ColSel = 1, the sort would be done according to the contents of columns 1, then 2, then 3.

The method used to compare the rows is determined by the setting, as explained above. The 9 (Custom) setting is the most flexible, since it fires the Compare event that allows you to compare rows in any way you want, using any columns in any order (see the Compare event for details). However, this method is also much slower that the others, typically by a factor of ten, so it should be used only when really necessary.

An alternative to using the 9 (Custom) setting is to create an invisible column, fill it with the keys, then sort based on it with one of the other settings. This is a very good approach for sorting based on dates, for example.


Sort, TextMatrix Properties (MSFlexGrid) Example

The example below sorts a grid according to the value of a ComboBox control. To try the example, place an MSFlexGrid control and a ComboBox control on a form. Paste the code below into the Declarations section, and press F5.

Private Sub Combo1_Click()

' Select Column according to Sort method.

Select Case Combo1.ListIndex

Case 0 To 2

MSFlexGrid1.Col = 1

Case 3 To 4

MSFlexGrid1.Col = 2

Case 4 To 8

MSFlexGrid1.Col = 1

End Select

' Sort according to Combo1.ListIndex.

MSFlexGrid1.Sort = Combo1.ListIndex

End Sub

Private Sub Form_Load()

Dim i As Integer

' Fill MSFlexGrid with random data.

MSFlexGrid1.Cols = 3 ' Create three columns.

For i = 1 To 11 ' Add ten items.

MSFlexGrid1.AddItem ""

MSFlexGrid1.Col = 2

MSFlexGrid1.TextMatrix(i, 1) = SomeName(i)

MSFlexGrid1.TextMatrix(i, 2) = Rnd()

Next i

' Fill combo box with Sort choices

With Combo1

.AddItem "flexSortNone" ' 0

.AddItem "flexSortGenericAscending" '1

.AddItem "flexSortGenericDescending" '2

.AddItem "flexSortNumericAscending" '3

.AddItem "flexSortNumericDescending" '4

.AddItem "flexSortStringNoCaseAsending" '5

.AddItem "flexSortNoCaseDescending" '6

.AddItem "flexSortStringAscending" '7

.AddItem "flexSortStringDescending" '8

.ListIndex = 0

End With

End Sub

Private Function SomeName(i As Integer) As String

Select Case i

Case 1

SomeName = "Ann"

Case 2

SomeName = "Glenn"

Case 3

SomeName = "Sid"

Case 4

SomeName = "Anton"

Case 5

SomeName = "Hoagie"

Case 6

SomeName = "Traut 'Trane"

Case 7

SomeName = "MereD Wah"

Case 8

SomeName = "Kemp"

Case 9

SomeName = "Sandy"

Case 10

SomeName = "Lien"

Case 11

SomeName = "Randy"

End Select

End Function


Text Property (MSFlexGrid)

Returns or sets the text contents of a cell or range of cells.

Syntax

object.Text [= string ]

The Text property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
string	A string expression containing the text contents of a cell or range of cells.
Remarks

When retrieving, the Text property always retrieves the contents of the current cell, defined by the Row and Col properties.

When setting, the Text property sets the contents of the current cell or of the current selection, depending on the setting of the FillStyle property.


TextArray Property

Returns or sets the text contents of an arbitrary cell.

Syntax

object.TextArray( cellindex ) [= string ]

The TextArray property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
cellindex	Integer. A numeric expression specifying which cell to read or write. See Remarks.
string	A string expression containing the contents of an arbitrary cell.
Remarks

This property allows you to set or retrieve the contents of a cell without changing the Row and Col properties.

The cellindex argument determines which cell to use. It is calculated by multiplying the desired row by the Cols property and adding the desired column. The clearest and most convenient way to calculate cellindex is to define a function to do it, as shown below:

' Calculate index for use with TextArray property.

Function faIndex(row As Integer, col As Integer) As Long

 faIndex = row * MSFlexGrid1.Cols + col

End Function

Sub Form_Load()

Dim i as Integer

' Fill MSFlexGrid with data using TextArray property.

For i = MSFlexGrid1.FixedRows to MSFlexGrid1.Rows - 1

' ** column 1

MSFlexGrid1.TextArray(faIndex(i, 1)) = RandomName()

' Column 2.

MSFlexGrid1.TextArray(faIndex(i, 2)) = RandomNumber()

Next


TextMatrix Property

Returns or sets the text contents of an arbitrary cell.

Syntax

object.TextMatrix( rowindex, colindex ) [= string ]

The TextMatrix property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
rowindex, colindex	Integer. Numeric expressions specifying which cell to read or write.
string	A string expression containing the contents of an arbitrary cell.
Remarks

This property allows you to set or retrieve the contents of a cell without changing the Row and Col properties.


TextStyle, TextStyleFixed Properties

Returns or sets the three-dimensional style for text on a specific cell or range of cells. TextStyle determines the style of regular MSFlexGrid cells, and TextStyleFixed determines the style of fixed rows and columns.

Syntax

object.TextStyle[= style ]

object.TextStyleFixed[= style ]

The TextStyle, TextStyleFixed properties syntax have these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
style	Integer or constant that specifies the text style, as described in Settings.
Settings

Settings for style are:

Constant	Value	Description
flexTextFlat	0	Flat (normal text)
flexTextRaised	1	Raised
flexTextInset	2	Inset
flexTextRaisedLight	3	Raised Light
flexTextInsetLight	4	Inset Light
Remarks

Settings 1 and 2 work best for large and bold fonts. Settings 3 and 4 work best for small regular fonts.


TopRow Property (MSFlexGrid)

Returns or sets the uppermost visible row (other than a fixed row) in the MSFlexGrid. Not available at design time.

Syntax

object.TopRow [= number ]

The TopRow property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
number	Long. A numeric expression specifying the uppermost row in MSFlexGrid.
Remarks

You can use this property in code to programmatically read or set the visible top row of the MSFlexGrid. Use the LeftCol property to determine the leftmost visible column in the MSFlexGrid.

When setting this property, the largest possible row number is the total number of rows minus the number of rows that can be visible in the MSFlexGrid. Attempting to set TopRow to a greater row number will cause the MSFlexGrid to set it to the largest possible value.


Version Property (MSFlexGrid)

Returns the version (as an integer) of the MSFlexGrid control currently loaded in memory.

Syntax

object.Version

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

The version number is a three-digit integer where the first digit represents the major version number and the last two represent the minor version number. For example, version 3.5 would return 350.


WordWrap Property (MSFlexGrid)

Returns or sets a value that determines whether text within a cell should be broken between words if a word would extend past the edge of the cell. Return characters – Chr(13) – also force line breaks.

Syntax

object.WordWrap [= boolean ]

The WordWrap property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	Determines if the text within a cell wraps. This property is False by default.
Remarks

MSFlexGrid can display text slightly faster if you set WordWrap to False.


FixedAlignment Property

Returns or sets the alignment of data in the fixed cells of a column in a grid.

Syntax

object.FixedAlignment (index)= [value]

The FixedAlignment property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
index	Long number that specifies the column.
value	Integer that determines the alignment of the data in the fixed cells, as described in Settings.
Settings

The settings for value are:

Constant	Value	Description
flexAlignLeftTop	0	Left Top
flexAlignLeftCenter	1	Left Center
flexAlignLeftBottom	2	Left Bottom
flexAlignCenterTop	3	Center Top
flexAlignCenterCenter	4	Center Center
flexAlignCenterBottom	5	Center Bottom
flexAlignRightTop	6	Right Top
flexAlignRightCenter	7	Right Center
flexAlignRightBottom	8	Right Bottom
Remarks

Fix the cells in a column using the FixedCols and FixedRows properties.


MSFlexGrid Control Constants

AllowUserResizing Property

Constant	Value	Description
flexResizeNone	0	Default. No resizing is allowed.
flexResizeColumns	1	Individual columns can be resized by user.
flexResizeRows	2	Individual rows can be resized by user.
flexResizeBoth	3	Individual columns and rows can be resized by user.
Appearance Property

Constant	Value	Description
flexFlat	0	Sets the overall look of MSFlexGrid to normal.
flex3D	1	Sets the overall look of MSFlexGrid to three-dimensional.
BorderStyle Property

Constant	Value	Description
flexBorderNone	0	No border.
flexBorderSingle	1	Single border.
CellAlignment Property

Constant	Value	Description
flexAlignLeftTop	0	Left top.
flexAlignLeftCenter	1	Left center. (Default for strings)
flexAlignLeftBottom	2	Left bottom.
flexAlignCenterTop	3	Center top.
flexAlignCenterCenter	4	Center center.
flexAlignCenterBottom	5	Center bottom.
flexAlignRightTop	6	Right top.
flexAlignRightCenter	7	Right center. (Default for numbers)
flexAlignRightBottom	8	Right bottom.
flexAlignGeneral	9	General.
CellPictureAlignment Property

Constant	Value	Description
flexAlignLeftTop	0	Left top.
flexAlignLeftCenter	1	Left center.
flexAlignLeftBottom	2	Left bottom.
flexAlignCenterTop	3	Center top.
flexAlignCenterCenter	4	Center center.
flexAlignCenterBottom	5	Center bottom.
flexAlignRightTop	6	Right top.
flexAlignRightCenter	7	Right center.
flexAlignRightBottom	8	Right bottom.
CellTextStyle, TextStyle, TextStyleFixed Properties

Constant	Value	Description
flexTextFlat	0	Regular text.
flexTextRaised	1	Text appears raised.
flexTextInset	2	Text appears inset.
flexTextRaisedLight	3	Text appears slightly raised.
flexTextInsetLight	4	Text appears slightly inset.
ColAlignment Properties

Constant	Value	Description
flexAlignCenter	2	Center data in column.
flexAlignLeft	0	Left-align data in column.
flexAlignRight	1	Right-align data in column.
FillStyle Property

Constant	Value	Description
flexFillSingle	0	Changing Text property setting affects only active cell.
flexFillRepeat	1	Changing Text property setting affects all selected cells.
FocusRect Property

Constant	Value	Description
flexFocusNone	0	No focus rectangle around current cell.
flexFocusLight	1	Default. Light focus rectangle around current cell.
flexFocusHeavy	2	Heavy focus rectangle around current cell.
GridLines, GridLinesFixed Properties

Constant	Value	Description
flexGridNone	0	Default for GridLines. No lines between cells.
flexGridFlat	1	Sets line style between cells to normal lines.
flexGridInset	2	Sets line style between cells to inset lines.
flexGridRaised	3	Default for GridLinesFixed. Sets line style between cells to raised lines.
HighLight Property

Constant	Value	Description
flexHighlightNever	0	Selected cells are never highlighted.
flexHighlightAlways	1	Default. Selected cells are always highlighted.
flexHighlightWithFocus	2	Selected cells are highlighted only when they are in focus.
MergeCells Property

Constant	Value	Description
flexMergeNever	0	Default. No merging.
flexMergeFree	1	All rows and columns set to MergeRow (or MergeCol) = True are free to merge in any direction.
flexMergeRestrictRows	2	Same as free merging except rows can only merge into cells on the left.
flexMergeRestrict-Columns	3	Same as free merging except columns can only merge into cells above.
flexMergeRestrictAll	4	All rows and columns set to MergeRow (or MergeCol) = True can merge either to the left or to the top.
MousePointer Property

Constant	Value	Description
flexDefault	0	Outline of MSFlexGrid control.
flexArrow	1	Arrow pointer.
flexCross	2	Cross-hairs.
flexIBeam	3	"I" shaped beam to allow for text entry.
flexIcon	4	A square within a square.
flexSize	5	Resizing pointer with arrows facing up, down, left and right.
flexSizeNESW	6	Resizing pointer with arrows pointing to the upper right and lower left.
flexSizeNS	7	Resizing pointer with arrows pointing up and down.
flexSizeNWSE	8	Resizing pointer with arrows pointing to the upper left and lower right.
flexSizeEW	9	Resizing pointer with arrows pointing left and right.
flexUpArrow	10	Arrow pointing up.
flexHourGlass	11	Hour glass symbol.
flexNoDrop	12	No drop pointer.
flexCustom	13	Custom style pointer.
PictureType Property

Constant	Value	Description
flexPictureColor	0	Allows full color.
flexPictureMonochrome	1	Monochrome only.
SelectionMode Property

Constant	Value	Description
flexSelectionFree	0	Default. Individual cells in MSFlexGrid can be selected.
flexSelectionByRow	1	Entire rows at a time are selected in MSFlexGrid.
flexSelectionByColumn	2	Entire columns at a time are selected in MSFlexGrid.
ScrollBars Property

Constant	Value	Description
flexScrollBarNone	0	MSFlexGrid has no scroll bars.
flexScrollBarHorizontal	1	MSFlexGrid has a horizontal scroll bar.
flexScrollBarVertical	2	MSFlexGrid has a vertical scroll bar.
flexScrollBarBoth	3	Default. MSFlexGrid has horizontal and vertical scroll bars.
Sort Property

Constant	Value	Description
flexSortNone	0	No sorting.
flexSortGenAscend	1	Ascending sort which guesses whether text is string or number.
flexSortGenDescend	2	Descending sort which guesses whether text is string or number.
flexSortNumAscend	3	Ascending sort which converts strings to numbers.
flexSortNumDescend	4	Descending sort which converts strings to numbers.
flexSortStrAscend	5	Ascending sort using case-insensitive string comparison.
flexSortStrDescend	6	Descending sort using case-insensitive string comparison.
flexSortStrAscendCase	7	Ascending sort using case-sensitive string comparison.
flexSortStrDescendCase	8	Descending sort using case-sensitive string comparison.
flexSortCustom	9	Uses Compare event to compare rows.


Change Event (placeholder)


Click Event (placeholder)


DblClick Event (placeholder)


DragDrop Event (placeholder)


DragOver Event (placeholder)


KeyDown Event (placeholder)


KeyPress Event (placeholder)


KeyUp Event (placeholder)


MouseDown Event (placeholder)


MouseMove Event (placeholder)


MouseUp Event (placeholder)


OLECompleteDragEvent (placeholder)


OLEDragDrop Event (placeholder)


OLEDragOver Event (placeholder)


OLEGiveFeedback Event (placeholder)


OLESetData Event (placeholder)


OLEStartDrag Event (placeholder)


Refresh Method (placeholder)


OLEDrag Method (placeholder)


Appearance Property (placeholder)


BackColor Property (placeholder)


Caption Property (placeholder)


Enabled Property (placeholder)


Font Property (placeholder)


ForeColor Property (placeholder)


IntegralHeight Property (placeholder)


Locked Property (placeholder)


MouseIcon Property (placeholder)


MousePointer Property (placeholder)


OLEDragMode Property (placeholder)


OLEDropMode Property (placeholder)


SelLength Property (placeholder)


SelStart Property (placeholder)


SelText Property (placeholder)


Style Property (placeholder)


Text Property (placeholder)


Keyword Not Found

The keyword you've selected can't be found in Visual Basic Help. It's possible that:

•	The keyword is misspelled

•	You selected too much or too little text

•	You asked for help on a word that is not a valid Visual Basic keyword.

The easiest way to get help on a specific keyword is to position the insertion point anywhere within the keyword you want help on and press F1. You do not need to select the keyword. In fact, if you select only a portion of the keyword, or more than a single word, Help will not find what you're looking for.

To use the built-in Help search dialog box, press the Help Topics button on the toolbar.

One option to possibly find what you're looking for is to view the ReadMe file that comes with Visual Basic. This document contains information regarding last-minute changes, additions, and deletions that did not make it into the final documentation.


Left, Top Properties (Placeholder)


Height, Width Properties (Placeholder)


Tag Property (Placeholder)


ToolTipText Property (Placeholder)


Count Property (Placeholder)


Item Method (Placeholder)


Hwnd Property (Placeholder)


TabStop Property (Placeholder)


Visible Property (Placeholder)


Picture Property (placeholder)


Max, Min Properties (placeholder)


Add Method (placeholder)


Clear Method (placeholder)


Container Property (placeholder)


Controls Collection (placeholder)


Copies Property (placeholder)


DataBinding Object (placeholder)


DataBindings Collection (placeholder)


Filename Property (placeholder)


FontBold, FontItalic, FontStrikeThru Properties (placeholder)


FontName Property (placeholder)


FontSize Property (placeholder)


GetData Method (placeholder)


GetFormat Method (placeholder)


HelpFile Property (placeholder)


Item Property (placeholder)


Remove Method (placeholder)


SetData Method (placeholder)


Align Property (placeholder)


DragIcon Property (placeholder)


DragMode Property (placeholder)


HelpContextID Property (placeholder)


TabIndex Property (placeholder)


Alignment Constants (placeholder)


Border Property Constants (placeholder)


BorderStyle Constants (placeholder)


BorderStyle Property (ActiveX Controls) (placeholder)


Clear Method (ActiveX Controls) (placeholder)


Clipboard Object Constants (placeholder)


Color Constants (placeholder)


CommonDialog Control Constants (placeholder)


CommonDialog Error Constants (placeholder)


Control Constants (placeholder)


DataBindings Property (placeholder)


DDE Constants (placeholder)


Drag-and-Drop Constants (placeholder)


Drawing Constants (placeholder)


FetchVerbs Method (placeholder)


Form Constants (placeholder)


Graphics Constants (placeholder)


Grid Control Constants (placeholder)


Help Constants (placeholder)


HideSelection Property (ActiveX Controls) (placeholder)


HideSelection Property (placeholder)


Image Property (ActiveX Controls) (placeholder)


ImageList Property (ActiveX Controls) (placeholder)


Index Property (ActiveX Controls) (placeholder)


Index Property (placeholder)


Key Code Constants (placeholder)


Key Property (ActiveX Controls) (placeholder)


Menu Accelerator Constants (placeholder)


Menu Control Constants (placeholder)


Miscellaneous Constants (placeholder)


MousePointer Constants (placeholder)


OLE Container Control Constants (placeholder)


Picture Object Constants (placeholder)


Printer Object Constants (placeholder)


RasterOp Constants (placeholder)


Remove Method (ActiveX Controls) (placeholder)


ShowInTaskbar Property (placeholder)


ShowTips Property (ActiveX Controls) (placeholder)


ShowWhatsThis Method (placeholder)


Text Property (ActiveX Controls) (placeholder)


Value Property (ActiveX Controls) (placeholder)


Variant Type Constants (placeholder)


Visual Basic Constants (placeholder)


WhatsThisButton Property (placeholder)


WhatsThisHelp Property (placeholder)


WhatsThisHelpID Property (placeholder)


WhatsThisMode Method (placeholder)


Windows 95 Control Constants (placeholder)


ColIsVisible Property (placeholder)


ColPos Property (placeholder)


DataObject Object (placeholder)


DataObjectFiles Collection (placeholder)


DataSource Property (placeholder)


Drag Method (placeholder)


DrawMode Property (placeholder)


FixedAlignment Property (placeholder)


GotFocus Event (placeholder)


GridLineWidth Property (placeholder)


Index Property (Control Array) (placeholder)


LostFocus Event (placeholder)


Move Method (placeholder)


Name Property (placeholder)


Object Property (placeholder)


Parent Property (placeholder)


RowColChange Event (placeholder)


RowIsVisible Property (placeholder)


RowPos Property (placeholder)


SetFocus Method (placeholder)


ZOrder Method (placeholder)


Files Method (placeholder)


Connect Event (placeholder)


HScrollSmallChange, VScrollSmallChange Properties (placeholder)


MinHeight, MinWidth Properties (placeholder)


Property Pages Dialog Box (placeholder)


RemoteHost Property (placeholder)


RemotePort Property (placeholder)


ViewportHeight, ViewportLeft, ViewportTop, ViewportWidth Properties (placeholder)


Resync Method (Remote Data) (placeholder)


ContainedVBControls Collection (placeholder)


Member Object (placeholder)


Members Collection (placeholder)


VBComponentsEvents Object (placeholder)


VBProjectsEvents Object (placeholder)


Files Property (placeholder)


Alignment Property (placeholder)


AboutBox Method (placeholder)


Col, Row Properties (placeholder)


RowHeight Property (placeholder)


Scroll Event (placeholder)


ScrollBars Property (placeholder)


SelEndCol, SelStartCol, SelEndRow, SelStartRow Properties (placeholder)


ScrollBars Property (placeholder)


Appearance Property (ActiveX Controls) (placeholder)


BackColor, ForeColor Properties (ActiveX Controls) (placeholder)


BorderStyle Constants (ActiveX Controls) (placeholder)


Caption Property (ActiveX Controls) (placeholder)


Change Event (ActiveX Controls) (placeholder)


Clear Method (ActiveX Controls) (placeholder)


Click Event (ActiveX Controls) (placeholder)


Clipboard Object Constants (ActiveX Controls) (placeholder)


Count Property (ActiveX Controls) (placeholder)


DataObject Object (ActiveX Controls) (placeholder)


DataObjectFiles Collection (ActiveX Controls) (placeholder)


DataSource Property (ActiveX Controls) (placeholder)


DblClick Event (ActiveX Controls) (placeholder)


Drag-and-Drop Constants (ActiveX Controls) (placeholder)


Enabled Property (ActiveX Controls) (placeholder)


FetchVerbs Method (ActiveX Controls) (placeholder)


Files Method (ActiveX Controls) (placeholders)


Font Property (ActiveX Controls) (placeholder)


FontName Property (ActiveX Controls) (placeholder)


FontSize Property (ActiveX placeholder)


GetData Method (ActiveX Controls) (placeholder)


GetFormat Method (ActiveX Controls) (placeholder)


HideSelection Property (ActiveX Controls) (complaceholder)


hWnd Property (ActiveX Controls) (placeholder)


Item Method (ActiveX Controls) (placeholder)


Key Code Constants (ActiveX Controls) (placeholder)


Key Property (ActiveX Controls) (complaceholder)


KeyDown, KeyUp Events (ActiveX Controls) (placeholder)


KeyPress Event (ActiveX Controls) (placeholder)


Max, Min Properties (ActiveX Controls) (placeholder)


MouseDown, MouseUp Events (ActiveX Controls) (placeholder)


MouseIcon Property (ActiveX Controls) (placeholder)


MouseMove Event (ActiveX Controls) (placeholder)


MousePointer Constants (ActiveX Controls) (placeholder)


MousePointer Property (ActiveX Controls) (placeholder


OLECompleteDrag Event (ActiveX Controls) (placeholder)


OLEDrag Method (ActiveX Controls) (placeholder)


OLEDragDrop Event (ActiveX Controls) (placeholder)


OLEDragMode Property (ActiveX Controls) (placeholder)


OLEDragOver Event (ActiveX Controls) (placeholder)


OLEDropMode Property (ActiveX Controls) (placeholder)


OLEGiveFeedback Event (ActiveX Controls) (placeholder)


OLESetData Event (ActiveX Controls) (placeholder)


OLEStartDrag Event (ActiveX Controls) (placeholder)


Picture Property (ActiveX Controls) (placeholder)


Property Pages Dialog Box (ActiveX Controls) (placeholder)


RemoteHost Property (ActiveX Controls) (placeholder)


RemotePort Property (ActiveX Controls) (placeholder)


SelLength, SelStart, SelText Properties (ActiveX Controls) (placeholder)


SetData Method (ActiveX Controls) (placeholder)


ShowTips Property (ActiveX Controls) (complaceholder)


Text Property (ActiveX Controls) (complaceholder)


Value Property (ActiveX Controls) (complaceholder)


hDC Property (ActiveX Controls) (complaceholder)


Height, Width Properties (ActiveX Controls) (complaceholder)


Index Property (ActiveX Controls) (complaceholder)


Left, Top Properties (ActiveX Controls) (complaceholder)


Tag Property (ActiveX Controls) (complaceholder)


Visible Property (ActiveX Controls) (complaceholder)


Remove Method (ActiveX Controls) (complaceholder)


Object Property (ActiveX Controls) (placeholder)


Property Pages (ActiveX controls) (placeholder)


No fonts exist (Error 24574) (Common Dialog Control) (complaceholder)


Help Contents placeholder


BorderStyle Property (ActiveX Controls) (placeholder)


RightToLeft Property (ActiveX Controls) (placeholder)


Refresh Method (ActiveX Controls) (placeholder)